package com.example.bankmanage.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.example.bankmanage.constant.StatusUsers;
import com.example.bankmanage.serialize.PhoneDesensitizationSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration;

import java.util.Date;

@Data
/**
 * 用户表
 */
//@TableName("t_user")
public class users {
    private Integer userId;
    private String username;
    private String password; //存储加密后的密码
    private String fullName;
    private String email;
    @JsonSerialize(using = PhoneDesensitizationSerializer.class)
    private String phone;
    private String idCardNumber;  //身份证号
    private String address;
    private Date dateOfBirth;//出生日期
    private Date registration_date;//注册日期
    private Date last_login;//最后登录的时间
    private StatusUsers status;  //ENUM('ACTIVE', 'INACTIVE', 'SUSPENDED') DEFAULT 'ACTIVE',
    private Boolean isAdmin;
}
